{extend name='common/common' /}

{block name='style'}
<link href="__JS__/clock/assets/css/style.css" rel="stylesheet" />
<style>
	.ibox-content{
		height: 350px;
		overflow: auto;
	}
	.layui-colla-title{
		background-color: #2f4050;
		color: #a7b1c2;
	}
	.articleTime{
		float: right;
	}
	#showFinRemind{
		cursor: pointer;
	}
	#showEnrollRemind{
		cursor: pointer;
	}
</style>
{/block}

{block name="content"}
<div class="wrapper wrapper-content animated fadeInRight">

	<div class="layui-col-md8" style="padding:5px;">
        <div class="ibox-title">
            <h5><span class="span-info">内部公告</span></h5>
        </div>
        <div class="ibox-content">
			<div class="layui-collapse" lay-accordion="" style="min-width:600px;">
				{volist name="articles" id="v" key="k"}
				<div class="layui-colla-item">
					<h2 class="layui-colla-title">{$v.title}<span class="span-info span-strong articleTime">{$v.add_time}</span></h2>
					{if $k eq 1}
						<div class="layui-colla-content layui-show">
					{else}
						<div class="layui-colla-content">
					{/if}
						{$v.content}
					</div>
				</div>
				{/volist}
			</div>
        </div>
	</div>
	<div class="layui-col-md4" style="padding:5px;">
        <div class="ibox-title">
            <h5>时间</h5>
        </div>
        <div class="ibox-content">
			<div class="clock-box" style="min-width:390px;">
				<div id="clock" class="light">
					<div class="display">
						<div class="weekdays"></div>
						<div class="ampm"></div>
						<div class="alarm"></div>
						<div class="digits"></div>
					</div>
				</div>
				<div class="button-holder">
					<a class="alarm-button"><i class="fa fa-clock-o"></i></a>
				</div>
				<audio id="alarm-ring" preload>
					<source src="__JS__/clock/assets/audio/ticktac.mp3" type="audio/mpeg" />
					<source src="__JS__/clock/assets/audio/ticktac.ogg" type="audio/ogg" />
				</audio>
			</div>
        </div>
	</div>
	<!-- <div class="layui-col-md6" style="padding:5px;">
        <div class="ibox-title">
            <h5>销售额对比</h5>
        </div>
        <div class="ibox-content">
			<div id="main1" style="width: 100%;height:300px; min-width:400px;"></div>
        </div>
	</div> -->

	{if authCheck('finance/acclist')}
	<div class="layui-col-md6" style="padding:5px;">
        <div class="ibox-title">
            <h5><span class="span-danger">财务提醒</span></h5>
        </div>
        <div class="ibox-content">
			<table class="table table-bordered table-hover text-center" style="min-width:400px;">
				<thead>
					<tr>
						<th class="text-center">订单单号</th>
						<th class="text-center">流水单号</th>
						<th class="text-center">学员</th>
						<th class="text-center">学校专业</th>
						<th class="text-center">下单时间</th>
						<th class="text-center">金额</th>
					</tr>
				</thead>
				<tbody>
					{volist name="FinRemind" id="v"}
					<tr>
						<td>{$v.order_sn|default=''}</td>
						<td>{$v.account_sn|default=''}</td>
						<td>{$v.st_name|default=''}</td>
						<td>{$v.st_major|default=''}</td>
						<td>
							{$v.c_time|date="Y-m-",###}<span class="span-danger span-strong">{$v.c_time|date="d ",###}</span>
							{$v.c_time|date="H:i:s",###}
						</td>
						<td>{$v.total_amount|default=''}</td>
					</tr>
					{/volist}
					<tr>
						{if condition="sizeof($FinRemind) == 0"}
							<td colspan="6">暂无数据</td>
						{else}
							<td id="showFinRemind" colspan="6">查看详情...</td>
						{/if}
					</tr>
				</tbody>
			</table>
        </div>
	</div>
	{/if}

	{if authCheck('education/enrollist')}
	<!-- <div class="layui-col-md6" style="padding:5px;">
        <div class="ibox-title">
            <h5><span class="span-danger">教务报名提醒</span></h5>
        </div>
        <div class="ibox-content">
			<table class="table table-bordered table-hover text-center" style="min-width:400px;">
				<thead>
					<tr>
						<th class="text-center">姓名</th>
						<th class="text-center">学校</th>
						<th class="text-center">专业</th>
						<th class="text-center">手机号</th>
						<th class="text-center">报名时间</th>
					</tr>
				</thead>
				<tbody>
					{volist name="$EnrollRemind" id="v"}
					<tr>
						<td>{$v.name|default=''}</td>
						<td>{$v.school|default=''}</td>
						<td>{$v.major|default=''}</td>
						<td>{$v.phone|default=''}</td>
						<td>{$v.school_date|date="Y-m-d",###}</td>
					</tr>
					{/volist}
					<tr>
						{if condition="sizeof($EnrollRemind) == 0"}
							<td colspan="6">暂无数据</td>
						{else}
							<td id="showEnrollRemind" colspan="6">查看详情...</td>
						{/if}
					</tr>
				</tbody>
			</table>
        </div>
	</div> -->
	{/if}
</div>




<div id="AlarmClockForm" style="display:none;padding:15px;">
	<ul>
		<li>
			<input type="text" id="AlarmClockForm_h" class="layui-input" placeholder="0">
		</li>
		<li>
			<input type="text" value="时" readonly class="layui-input">
		</li>
		<li>
			<input type="text" id="AlarmClockForm_i" class="layui-input" placeholder="0">
		</li>
		<li>
			<input type="text"  value="分" readonly class="layui-input">
		</li>
		<li>
			<input type="text" id="AlarmClockForm_s" class="layui-input" placeholder="0">
		</li>
		<li style="width:100px;">
			<input type="text" value="秒 之后提示" readonly class="layui-input">
		</li>
	</ul>
	<div class="layui-form-item">
		<textarea placeholder="请输入内容" class="layui-textarea" id="AlarmClockTips"></textarea>
	</div>
</div>

<script type="text/javascript">
    // var myChart = echarts.init(document.getElementById('main1'));
    // // 指定图表的配置项和数据
    // var option = {
    //     title: {text: '销售额对比'},
    //     tooltip: {trigger: 'axis'},
    //     legend: {
    //         data:['选择时间段','对比时间段']
    //     },
    //     grid: {left: '3%',right: '4%',bottom: '3%',containLabel: true
    //     },
    //     toolbox: {
    //         show:true,
    //         feature: {
    //             dataView: {readOnly: true},
    //             magicType: {type: ['line','bar']},
    //             restore: {},
    //             saveAsImage: {}
    //         }
    //     },
    //     xAxis: {
    //         type: 'category',
    //         boundaryGap: true,
    //         data: ['2018-03-15','2018-03-20','2018-03-25','2018-04-01','2018-04-05','2018-04-10','2018-04-15','2018-04-20']
    //     },
    //     yAxis: {
    //         type: 'value',
    //         axisLabel: {
    //             formatter: '￥{value}'
    //         }
    //     },
    //     series: [
    //         {
    //             name:'选择时间段',
    //             type:'line',
    //             smooth: true,
    //             data:[10,20,50,60,70,100,80,90]
    //         },
    //         {
    //             name:'对比时间段',
    //             type:'line',
    //             smooth: true,
    //             data:[50,25,33,77,56,15,99,25]
    //         }
    //     ]
    // };
    // // 使用刚指定的配置项和数据显示图表。
    // $(function(){
    //     myChart.setOption(option);
    // })
</script>
<script src="__JS__/clock/assets/js/script.js"></script>
<script src="__JS__/clock/assets/js/moment.min.js"></script>
<script>
layui.use(['element', 'layer'], function(){
  var element = layui.element;
  var layer = layui.layer;
  //监听折叠
  element.on('collapse(test)', function(data){
    layer.msg('展开状态：'+ data.show);
  });
});

$(function(){
	$("#showFinRemind").on('click',function(){
		var url = "{:url('finance/accList')}?type=1";
		url += "&seaStatus=0";
		var oDate = new Date();
		url += "&seaTime=" + oDate.getFullYear() + "-" + (oDate.getMonth() + 1) + "-01";
		url += " - " + oDate.getFullYear() + "-" + (oDate.getMonth() + 2) + "-01";
		window.location.href=url;
	});
	$("#showEnrollRemind").on('click',function(){
		var url = "{:url('education/enrolList')}";
		window.location.href=url;
	});
})
</script>
{/block}
